These sample programs are used in Apple's Developer University 5-day class on Creating OpenDoc Parts. All these samples part editors are built using the OpenDoc Development Framework (ODF).
This version is based on using:
OpenDoc DR4 for the Mac
ODF 1.0 d11
Code Warrior 7.x. for PowerMac
OR
Symantec Rainbow 8.0.4d11 (Note Projects marked with "NO Rainbow" are still under construction and may be on the WWW by the time you read this.)
I. Installation
These sample projects are all located in the "DUProjects" folder.
a. Place the "DUProjects" folder in your "ODFDev" folder, at the same level as your "ODF" folder.
b. Put an alias to the "*DUEditors" or "*DUEditors RB" folder in your Editors folder in your System Folder. Each of the projects places the part editor in the "*DU Editors" folder.
c. Place an alias to the "*SOM Libs" or "*SOM Libs RB" folder in your Extensions Folder in your System Folder. Each of the projects that build a SOM library places the shared library in the "*SOM Libs" or "*SOM Libs RB" folder.
II. Documentation
Many of the samples have a "Documentation" folder that has two System 7.5 clipping files. One shows a screen dump and feature list for the sample. The other shows a class diagram of the program structure.
III. Sample Projects
A. SOM Libraries:
Counter SOM Library - an example of a simple SOM library.
Counter SOM Test - a test project/application that uses the Counter SOM library. (NO Rainbow.)
Finance SOM Lib - a SOM library containg 8 simple financial functions.
Finance SOM Test - a simple C++ test program for the SOM library. (NO Rainbow.)
Finance Source - C++ functions used by the SOM library.
Talker SOM Test - tests the SOM TalkerLib. (NO Rainbow.)
TalkerLib C++ Source - a C++ library for speech synthesis, used by the SOM library.
TalkerLib SOM - a SOM library that provides text-to-speech synthesis. The implementation of the SOM functions is delegated to the C++ Talker Library.
B. ODF Part Editors
Bugs - does nothing useful except show how to use the ODF debugging subsystem.
Calc - a simple financial calculator that shows how to put a button in a frame. Uses the Finance SOM library listed below to do a simple financial calculation. (NO Rainbow.)
Data - shows how to manage various items of data in a part.
DataCmd - shows how to make a simple command object to support Undo.
DataSave - shows how to manage a collection of items. Support for creating items, selecting them, storing them in a document. Uses the DU Selection Framework.
DU Selection FW - a set of classes (i.e., a framework) to make it easier to manage a collection of items in an ODF part.
Event - shows how to handle mouse clicks and keystrokes.
Graphics - shows how to draw pictures, text, shapes using the ODF Graphics subsystem. Shows how to do simple printing. Shows how to manage the frame and window size.
Idling - shows how to do something simple at idle time - in this case it blinks a large arrrow on and off. Shows how to manage the frame shape, used shape, and window size.
Mnu - shows how to add simple menus to your part and frame.
Sample1 - the smallest ODF sample. Displays a solid green frame.
Sample2 - adds support for speech synthesis using the SOM TalkerLib. (NO Rainbow.)
Sample3 - adds support for handling a mouse click. (NO Rainbow.)
Sample4 - adds support for drawing a picture. (NO Rainbow.)
Starter - a good starting point for a new project. Shows how to manage simple data, draw a few things, handle events, handle menus, and do something at idle time.
Talker - uses the TalkerLIB SOM to convert text to speech. It will speak any text dragged onto it or pasted into it. (NO Rainbow.)
Windoid - shows how to display a palette window floating above the main frame.
IV. Rainbow
There is an MPW script in this directory to build all the Rainbow parts called "BuildRainbowDUParts". Execute it from MPW or ToolServer to make all the parts that can be built with Rainbow.